<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@include file="../../include/head.jsp"%>

<div class="container_12 ">

    <div class="grid_12 mgbt bgw">
        <div class="lh nbar">
            主机：${host.ip}
        </div>
    </div>

    <div class="grid_12 bgw">
        <div class="p10">
            <table class="list mgb_10">
                <thead class="ui-state-default">
                <tr>
                    <td colspan="8">内存使用情况</td>
                </tr>
                </thead>
                <tr>
                    <td class="w8p">内存总量：</td>
                    <td><fmt:formatNumber value="${hostinfo.hostInfo.men_all/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G</td>
                    <td class="w8p">内存使用量</td>
                    <td><fmt:formatNumber value="${hostinfo.hostInfo.mem_used/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G</td>
                    <td class="w8p">内存剩余量</td>
                    <td><fmt:formatNumber value="${hostinfo.hostInfo.mem_free/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G</td>
                    <td class="w8p">内存交换区总量</td>
                    <td><fmt:formatNumber value="${hostinfo.hostInfo.mem_swap/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G</td>
                </tr>
                <tr>
                    <td class="w8p">交换区使用量</td>
                    <td><fmt:formatNumber value="${hostinfo.hostInfo.men_swap_used/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G</td>
                    <td class="w8p">交换区剩余量</td>
                    <td><fmt:formatNumber value="${hostinfo.hostInfo.mem_swap_free/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G</td>
                    <td colspan="4"></td>
                </tr>
            </table>

            <table class="list mgb_10">
                <thead class="ui-state-default">
                <tr>
                    <td colspan="8">盘符情况</td>
                </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>盘符</td>
                        <td>格式</td>
                        <td>类型</td>
                        <td>总量</td>
                        <td>剩余</td>
                        <td>可用</td>
                        <td>已用</td>
                        <td>使用率</td>
                    </tr>
                    <c:forEach items="${hostinfo.hostInfo.disk}" var="disk">
                        <tr>
                            <td>${disk.value.devname}</td>
                            <td>${disk.value.systypename}</td>
                            <td>${disk.value.typename}</td>
                            <td>
                                <fmt:formatNumber value="${disk.value.total/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G
                            </td>
                            <td>
                                <fmt:formatNumber value="${disk.value.free/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G
                            </td>
                            <td>
                                <fmt:formatNumber value="${disk.value.avail/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G
                            </td>
                            <td>
                                <fmt:formatNumber value="${disk.value.used/1024/1024}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber>G
                            </td>
                            <td>${disk.value.usePercent}%</td>
                        </tr>
                    </c:forEach>
                </tbody>
            </table>

            <table class="list mgb_10">
                <thead class="ui-state-default">
                <tr>
                    <td colspan="8">CPU情况</td>
                </tr>
                </thead>
                <tr>
                    <td>CPU</td>
                    <td>用户使用率</td>
                    <td>系统使用率</td>
                    <td>当前等待率</td>
                    <td>错误率</td>
                    <td>空闲率</td>
                    <td>总使用率</td>
                </tr>
                <c:forEach items="${hostinfo.hostInfo.cpu}" var="cpu" varStatus="vs"  >
                    <tr>
                        <td>${vs.index+1}</td>
                        <td>${cpu.value.cpu_user}</td>
                        <td>${cpu.value.cpu_sys}</td>
                        <td>${cpu.value.cpu_wait}</td>
                        <td>${cpu.value.cpu_nice}</td>
                        <td>${cpu.value.cpu_idle}</td>
                        <td>${cpu.value.cpu_combined}</td>
                    </tr>
                </c:forEach>
            </table>
        </div>
    </div>

</div>

<%@include file="../../include/foot.jsp"%>